#ifndef _INTEGRAL_HPP_
#define _INTEGRAL_HPP_

#include <boost/thread/thread.hpp>

#include <iostream>
#include <vector>

#include "monitor.hpp"
#include "config.hpp"



class ThreadFunc
{
private:
    data_t  _data;
    double  _result;

    Monitor< data_t> *_monitorRcv_ptr;
    Monitor< double> *_monitorSnd_ptr;

    void rcvTask();

    void processData();

    void sndResult();
public:
    void operator()();

    void Init( Monitor< data_t> &task_monitor, Monitor< double> &result_monitor);
    ///////////
    ThreadFunc();
    ThreadFunc( Monitor< data_t> &task_monitor, Monitor< double> &result_monitor);

    ~ThreadFunc();
};

#endif// _INTEGRAL_HPP_
